<!doctype html>
<html>
	<head>
	<meta charset="utf-8">
	<title>时间</title>
	<script>
	
	function toOtherPage(){
		location.herf = "222.html";
		
	}
	function refresh(){
	location.reload();
	}
	function toThisPage(){
		location.hash ="nowTime";
		
	}
	window.onload =(function()
					{
		document.getElementById("showTime").innerHTML =(new Date()).toLocaleTimeString();
													   
	});
	</script>
	</head>
	<body>
<input type="button" value="跳转到USA" onclick="toOtherPage()">
<input type="button" value="跳转到时间" onclick="toThisPage()">
<input type="button" value="刷新页面" onclick="refresh()">
<a  name="nowTime" href="#">当前时间：<span id="showTime" name="nowTime"></span></a>
<input type="button" value="反回上一页" onClick="history.back()">
<input type="button" value="反回下一页" onClick="history.forward()">
</body>
</html>
